package com.xsjiong.hoofen.entities;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public interface DataEntity {
	void writeTo(DataOutputStream out) throws IOException;

	void readFrom(DataInputStream in) throws IOException;

	JSONObject toJSON() throws JSONException;

	void readFrom(JSONObject obj);
}